![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
lifion-aws-event-stream
Advanced tools
Node.js parser for the application/vnd.amazon.eventstream content-type.
Node.js parser for binary streams under the application/vnd.amazon.eventstream content-type.
To install the module:
npm install lifion-aws-event-stream --save
The module exports a parse function and a Parser stream. To use the parse function:
const { parse } = require('lifion-aws-event-stream');
const buffer = Buffer.from('000000100000000005c248eb7d98c8ff', 'hex');
console.log(parse(buffer)); // { headers: {}, payload: '' }
To use the Parser stream:
const { Parser } = require('lifion-aws-event-stream');
const parser = new Parser();
parser.on('data', console.log); // { headers: {}, payload: '' }
const buffer = Buffer.from('000000100000000005c248eb7d98c8ff', 'hex');
parser.write(buffer);
Pipe an HTTP response to parse the messages as they arrive:
const got = require('got');
const { Parser } = require('lifion-aws-event-stream');
const { pipeline } = require('stream');
pipeline([
got('/', …),
new Parser(),
new Writable({
objectMode: true,
write(data, encoding, callback) {
console.log(data);
callback();
}
}),
]);
This project's implementation is based on:
Transform
object
Transform
A transform stream that calls parse with the binary data written to it. Can be used to pipe a response stream from an AWS service HTTP request. The stream will emit errors thrown during parse calls.
Kind: static class of lifion-aws-event-stream
Extends: Transform
See: https://nodejs.org/dist/latest-v10.x/docs/api/stream.html#stream_class_stream_transform
object
Parses the specified buffer with vnd.amazon.eventstream data into an object.
Kind: static method of lifion-aws-event-stream
Returns: object
- The parsed vnd.amazon.eventstream object.
Throws:
Error
Whenever:
Param | Type | Description |
---|---|---|
buffer | Buffer | The buffer to parse. |
FAQs
Node.js parser for the application/vnd.amazon.eventstream content-type.
We found that lifion-aws-event-stream demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.